assignment 7 for DMwR