fixing tests and line numbering of code blocks