added ex 5
ex 5 tweaked