add click handler to tiles