added functionality to animations