Update method used to get dimensions.