changed query method syntax