initial java code (not yet compiled)