misc functions
misc function interfaces
move misc functions to util.c
The util.c has benn joined the source files