added check the string powers (non deterministic)