defer formatting to the listener function