added a try catch for setting precsion