Finished rough version of writing functions in cpp, exposing now in sdk file