restructure: design and implementation