refactor trail dodag buffer