add Token replacement func