removed free(), segfaults?