Move code after figure since it does not include these changes and better fits comment on state