how to rewrite matric