query method added