adding draw function, and skipping repeat images