fixing rubocop and foodcritic errors