changed stringtokenizer and commentted out rootptr