some more structural reworking