new main caller - replacement for C/C++ code