remove duplicate code
Merge pull request #125 from jacobwagner/master

remove duplicate code