finished update product function and tests