update edit code