Adds implementation to be called from c code