changed way in which button is removed