Added apply to tuple function