refactor shift state