switched map for each