move the callbacks into the struct