fixed bug in problem1
fixed bug in problem1