finish cover.c and part of ex-2.c fo cover.c