Added table height calculation