some changes to main java file