remove obsolet function
simple refactoring to reduce code size
move thread_context into slice_units