add java port for comparison