initial commit of java version