divided C functions to another file.