restructure and add map