added where method in models