fixed some logic
Merge pull request #124 from JYoung217/logic2

fixed some logic