added commits. tested but was not able to test with tor on machine
fixed merge conflicts
Merge pull request #12 from xiamike/code

Code
fix merge conflicts