object animation loop working