fix rubocop warning 'ClassLength'