refactored interaction mapping to use a dict