added all triangle functions