Added triangle checking function