changed it so that we iterate through dimensions before repeating.

Also removed the outputs for the sizes of vectors in list