added so we dont visist a state twice