update string in function