rework of javascript