adding ajax for view