tried a stackoverflow should work. bug where statechange not detected)