deleted worthless programs. I believe segfault is because of a dereferencing of null pointer