Testing
rewrote codes into functions
added test (unfinished)
testsuite all working
add comments in model