update offset instead of slicing