adapted restructering of types in devsurf