added on click events to images