More correct worker implementation