update and clean the js