finished test script and did bug fixing stage 1