moved functions to cmdInterpreter