changed dummy variable to dict