Minor refactoring (to pass rubocop test)