use strings.NewReader instead of buffer