First version for Assignment 1.

TODO:
Update Test and Refactor the code