added ability to switch from production to test