cleanup.  added getSubstring() recursive method.