Thanks for the thoughts. I'll try to read more about closures, as I am not sure I understand. I'll give it a look though. As for reforumlating the algorithm, I have reworked it numerous times, and believe me or not, this is by far the most logical and sane version.