writeup1 + part of ex3