Added flat c interface