introduce Rename and split Attach functions into multiple functions