changed click events to mousedown