adjustments to javascript