use calculateMaxWork to handle failed sub-requests correctly
finish resolving merge conflict