wrote a working test for ex 2