refactoring warning code + new warnings