add first part of global exception handling