better dimension calculation