updated test script to allow offscreen mode