put the globals into state