save js work
simplify js code