implement missing apis, delete stubs