add generic routines from vesper