Rewrote shift_scope