support for main method.