edit and discard system