Addded main method.