Delay function added