Basic business logic.
Merge pull request #2 from ivanzhaowy/master

Basic business logic.