psuedo-code for click handlers