pythonic fixes