added js calc