Add method for calculating height.