rewrite task3