safer environment handling