exercise 1

Change the module to contain only one function, added extra test cases, added extra comments