hack to track state