Added makeTriangle function because code was not compiling without it.