Updated functional test script