edit function duble