replace ugliness
add base class callback to wrap_cpp.jl