add if statement
Merge pull request #1 from nclundsten/hotfix/ifstatement

add if statement