Refactored: with rubocop requirements