refactored with using ActiveModel::Validations