merged add + edit