setTimeout function added