animation script improved