removing the unwanted thread sleep