updated to use warning