2 line logic merge using ternary operator

Just merged 2 lines of logic together to make it a bit more readable.
Merge pull request #29 from TrevorFoster/patch-1

2 line logic merge using ternary operator