added split function for string tokenizing