added option to set environment variables