made things more pythonic