added only triple pattern support