add onClick function to cells