restructure elements