dynamic sleep time instead of hard-coded once