added save discontinue functionality