1. Introduced a dynamic formatter function to reduce potential code bloat