refactor metods