adding functions to help writing unit tests for the exercise.