implement cons.c