in this portion I have a memory leak of 5 blocks which seems to match my loop turns so I tried adding free(newcw); in the while loop but I get a segmentation fault 11 error