another major change in structure (not finished)