added widdio instance to stateChange callback