shift_encode(1)

first draft of shift_encode