Merge pull request #10 from awp1121/master

merge logic from awp