add code and write-up for #5-errors