added solution to ex 7