refactoring
added getter for dimensionY