added ajax for delete and create