formatting
messy promotion function