modify segment task script