working on the Add/Update Dialog