finished probem 3
first two problems