enabled rubocop and fixed code for rubocop style