add sleep(1) after dead while