Rest of chapter 18, still needs work