initWorker function removes wierd immidiate pattern