modified demo, removed silly if from click listener