Priority assignment done with mod 10. Can use more than 10 threads now.