More pythonic way