implement remove_goal