set environment properly