Added delay as a parameter for actions