add test for complex $pull queries