changed division to ensure integer.