add comment on sleep, get rid of useless function