added save and cancel features