Better worker algorithm