added code to handel bytecode (main.cpp)