done problem 3
finished problem 4