Implemented rename function.