Added java main method