modelled functions from problem 3a