note about my javascript/java calculation