modified getDimensions for non-square population