simple data structure implementations in C