add repeat function
modified zip function