switch between map and list
some cleaning