add code for problem 001~006, but 004