use class method instead of instance method in scope example