complies, but gives segmentation fault