Made the button functional