refactor job runner