move state change to head of section