creating commloop worker with these functions