working on pure js version of molcalc