need to finish ex18.c