reorganizes structure