drughiv function

data from Exercise 7.6, p222