default environment as parameter

default environment as parameter of detectEnvironment method