added some code for generating new states; not working yet