Use this branch for testing
allow setting environment when calling connect