updates to formatting function