finish debugging, making parser work correctly with test case in hw3&4