working on C interface