Added query method with status parameters