Introduced function to tokenize spaces