merge with query before hwrite