refine can.c and can.h