error was undefined, switched to error