fix #3

writing unit test for the project

first time to write test, I use a lot of spy

regard the procedure as block box, give it input, to test if it return
back correct output