restructuring. multiple compilation errors