changed a thrown string to char*