Ta changes

The changes suggested by our TA. Also added in a couple new test case.