wrote a working test for ex 3