few adjustments in js