some rubocop refactor