I renamed problems 1 and 2 to the proper naming convention and added the code for problems 4 and 6