Changed to use zipWithIndex