added isProduction variable and corresponding conditional