starting work on global error handling