added util.c and util.h