removed the double return statement of tokenize(), as error raising makes this unnecessary