more experimental restructuing of code