c++ is not good + beginning of cleanup :(