refactor exercise 6

improve reverse method to account for lines
refactor exercise 9

improve reverse method to account for lines