Refactor for parallel model