updated build to use environmental variables