no need to initialize buf with zeros