refactor the information js