added select.select() instead of the simple sleep() to delay..