modified zip function