Finished animation code