removed dimensions code into own module