added where() method to models