refactor defer -> deferMethod