Added testing for ex 6 and 7