working on the segmentation fault 11