deprecated code  in javascript