add shake function to change the animation