trying java code again