Complete implementaion of Add and Update Done