replaced onclick with jquery click listener