improve buffer