commented out srand() in updateState()