Added Triangle Fucntion