rewrite zip() without using select()