use new integer div/mod functions