add mouse click event handler to cells