Pass jobState completely
Extract duplication