allow simple optimization of the OK case, at the cost of some code duplication