added evaluation of triangle code. still has #IND to debug