updated libjs to have a scaling method