move genv to gen_utils file