Caligo: > Those nested for-loops are painful to look at. I think they aren't so bad in that code. Problems like that can be solved with hard-coded code or with generic and more flexible code. The code shown is more toward hard-coded. Feel free to write a different solution, with fewer nested loops. Bye, bearophile