Added switching between list and map