added code for animating the button