added support for custom environment

I added a function which allows you to add environment variables.