fixed a small logic error in exercise 1-19