code for interactive display