- fix logic in last commit and simplify the logic a bit