add ajax and confirm method