added back a per-function from_c helper