added final triangle to end recursion