fixed problem 3, so much faster now
finished problem 6
finished problem 7
finished problem 8