adding preventDefault() for click handlers