added function query_with_props() to extremes_queries.r