phase 1 change global -> local state