James is set up to be a foil for Alfred all the way through. While Alfred is not perfect, at least he has an interest in improving himself and being someone. James at one point had similar desires, but he lost them along the way. Alfred sees James fall victim to negative influences, especially heroin. Alfred realizes that he could very easily be in the same position as James, and Alfred almost crosses that line about halfway through the book. It is James's behavior that snaps Alfred back into his discipline. At Major's party, Alfred indulges in marijuana and alcohol, but when he sees James indulging with more dangerous heroin Alfred suddenly realizes just how bad James is, and just how bad he himself could be. Part of Alfred's desire to be someone rests also in being loyal to James, no matter what. This is a lesson taught by Mr. Donatelli—when someone needs you, even if he or she does not admit it, you come through. Alfred does that for James at the end of the book. It takes some coaxing, but James eventually responds to Alfred. For him, Alfred is the only person in the entire world who understands and cares to help him, and knowing that is enough to motivate James to change at the end of the book.