problem 2 has eror in main