update for problem 5

also fix problem1