added trigram utility