deleted throws StringIndexOutOfBoundsException in methods