Added display function to main.js