rewrite first homework