if to or, maybe more pythonic