redid the sso includeOptimized branch