move env to global
resume doesn't work.