working on adding ajax-based adding and updating