Added delay variable