moving more of the old formatting function to the new one