refactored display-time survey code