Function of Add,update and delete