finished ex19.c