mostly laid foundations for error reporting