seg faults but runs a tillte