simplified the method removal code