refactored print and stat order