main->worker
explanation in example