got rid of delay() in two effects