refactored animation to trickle array function