Main java updated