solve exercise 5: lines