adding complex type queries