updated add and edit function