Refactor Ex8 so everything is one line now