removed buggy references to state