rename and refactor the scripts