printing variables on click