tidy messed the js