extract a method