Implemented animation looping