implement most of the vtable