added zip function for arrays