update with try catch