changes to PUT function, removed unneeded 'cas' checks