Changed zipwith to a function