changed state cpp and h