optimize warnings