forgot to convert buf to string