Merge pull request #28 from echen027/master

cleaned up the code