use unless instead of if
Merge pull request #99 from rootlch/simplify-code

use unless instead of if