using pointer to pointer to track the next field
adding removal
fixing valgrind error