added missing import for UserWarning