extracted a method