Added a triangle functionality

Adjusted methods to make the triangle function work