Changed the delay in setTimeout in order to meet the criteria