moving functions to shell.h