functionized program
Merge pull request #1 from DZee/patch-1

functionized program