refactor for preparing job persistent