finished implementing the tests and added necessary comments