first implementation of triangle deletion
some bug fixes