improve env lookup