restructure at layer level