Modified exec.cpp