rewrite lab2