minor changes
rename to hpp and use c++ linkage