add handling code for tuple