use predefined func in model/database for search