Removed extra console.log and added code to show the window on click