Refactored format_description into helper function