use isStateValid() instead?