changed query to follow standard