Try using dynamic query like in BAM.com