changed zip function to use booleans