moved functions over to format functions.