Moving to a dict-based approach for the output