ajax for edit works