adapted to use the new error manager