pythonic changes