added try/catch for thrown exceptions