Lab4_B_solution.R