REFACTOR: code for division is easier to understand