some try at learning trigram features and a space leak