Added tests for hw5 and added additional comments