updated worker.c