fixing java conversion