damn maciep, your code is as cryptic as ever.
can't get the logic solved out by simply taking a look at it.