edit functionality is working

Needs JS  refactoring