some fix to make it more c++