Avoid duplication of remaining size calculation