now button name can be changed to 'connect' or 'close'