moved where query method is sent in