added correct copy constructor to state class