extended C-API