finished problem 3
finished problem 4