added some functions to worker