fixed add and edit(partilly)