remove duplicate code
Merge pull request #52 from dimagi/duplicate

remove duplicate code