Division is returning float in Py3. Fix by changing type to int.