Add main function. fixed #1.

Add main function. fixed #1.