Starting code for D2.