fixed goto main, removed assign redundancy

added new test cases