reorders function calls in mainDisplay()