deprecated js code