Seperated into functions
Merge pull request #1 from hust921/devel

Seperated into functions (Merge)