bi and trigram working