Changed substrings to charAt. Didn't work.