Added save animation function