solved problem #3
solved problem #4
solved problem #5
solved problem #6