fix code snippet formatting in chapter 5

Removed some white space to fix the extra line and shifted text.