write divideBy function for exercise 3.2