move formatting to separate module