Same as 18, but now I added a triangle generator