constructing my own ideal data structure, mostly in C