repalced specific klass.named_scope with generalized version