buf and str