refine cell height calculation