refactored check-display