Changed the value of "State" to "state" and then added some stuff in the search function. Still working throught the bugs