Solved problem #7, added problem #8