added a format helper function to the menu