add a c api for some of the functions