updating the button function, its done now