some frequently used  datastruct functions written by C