thx again, this code is nearly doing as we want and we think to have figured out how to change it to meet our requirments. also thx for the tip using a heap...
should there be more problems i'll post again! [mx] -- http://mail.python.org/mailman/listinfo/python-list