small optimization

you can use 2 dots in for in loop to except dimension value