corrected errors in exercise 4