simple method for trigram working