refactored dict again