changed query map to house tuples