Add computeHeight static helper method