string is copied by a right way