now accept environments with arguments
basic tests pass