major rewrite of the re-naming function today. now uses a loop instead of select. also added more input validations to script.js