Could you change the ```getDimension()``` methods to return your variable, so the information is not stored twice?