removed redundancies in code
Merge pull request #26 from echen027/master

removed redundancies in code