Animation loop

Creating a function to make it a loop