finish add/delete/modify function.