WIP: environment resolver