Add edit functionality and edit result