debugging the java codes