updated and extended skeleton example now providing four functions