rubocop refactor