update
handling errors without exceptions