Basic structure for problem 5