fixed tokenize so that expressions ending in ')' dont have a space at the end