implemented generic doubley linked list in C