shell.cpp conversion to C style from 'new' operaton