use int as long if python 3 and above