started implementing unit tests to find the bugs in the code.