attempting to rewrite type conversion function but getting seg faults