switched contacts from, list to dictionary