Refactored so that you wrap a dictionary in a structured dict in order to validate