more pythonic style