use Rubocop
some refactoring