shorten redundant if statement
Merge pull request #28 from Dyddye/master

shorten redundant if statement