refactoring + added command line option -wdcheck