Refactor. Extract methods