method referctoring