functional rename script