Set multiple environments logic