don't use sys.maxint (deprecated at Python 3)