changes to rshell.cpp