clean up code
added environment variables