finish basic renaming, but contains bugs