restructuring code using ActiveSupport::Concern