start adding a write callback