improve code with rubocop