buffer += data works correctly, right?