started writing c-bindings