change local env logic