prob18-20
functions