loop-over works for 1d vectors