Adding state detection