js calc - 1st cut