adds test for reverse queries