implemented core adaptive slicing algorithm