refactor with rubocop