better shift inference