Added C interface functions (not tested)