i have a program that animates but it switches from image to image