commit code for problem 1 ~ 3