update to include test parameter

The API supports a test variable, which is now usable in this code