added buffer and buf to string