corrected with rubocop