updates to cffi callbacks