learn cpp again, to overcome the undefined reference to vtable