rearranging things to handle scope properly
adding test click event