Added query raw function to model