adding event listeners to markers