move approot init into env