got portal query working