A sleep has been added inside the loop function