improved edit and delete ajax