Defined rename

Included a check to make sure vector size is the same as original.