refactored the animation and color methods