partially done with block011_write-your-own-function