triple pattern querying working