remove duplicate code
Merge pull request #489 from dwradcliffe/patch-1

remove duplicate code