Add delete function in executeCommand()