refactor using RuboCop