offloading to worker function