Ok works but still segFault