cleaned up code and will now be checked with rubocop