adding some thread sleep