Add checking the height of pyramids.

do
...
while