split responsibility into server and worker