add private setCallbacks function