updated thread slicing to work properly with parasites