refactored display functions