answered problem6
edited problem5 and 6