Started converting to java