cleans up code for rubocop