simplified outer loop in opls, docs