replace source SET_STATE handlers with callbacks