updating with the x button