use integer division where appropriate