some changes to java class