added solution to ex 5