added working delay and other things