updated to use the delay from the gif