work on complex refs query form