substrings setup
Finalized substrings for power