improve the mechanism to compare id between job list and priority list