added time.sleep to reduce processor load