javascript client rework