changed the ajax and added cancan