wrote the mosaic correction section