addinng and updating item functionality