Back here again the second time and still I do not get this task validated. I already took the output formatting from the CG solution but it still does not want to validate. The overall approach is.... -> take the string, run it through the Tokenizer -> a list of tokens is the result -> parse the tokens list (Parser class). Result is some kind of abstract syntax tree -> now the Interpreter class (for simplicity I create Tokenizer and Parser inside that class) ... it traverses over the tree, looks for a node that can be calculated (left and right node sides are numbers or right side is a number and nodes tokenType is sin, cos, tan or neg). Executes the calculation and replaces the node with a number node (the result). -> If just a number node is left after running the Tokenizer, Parser and Interpreter, then the result is ready to be displayed, if not recreate the term and pass that string back to the recurse method. No luck :( (admitted the Interpreter is pretty silly... it'll be better to just traverse and do all the calculation while traversing when possible - but I needed to make it fit into that recurse method) So if anyone has any idea what's going wrong here.... Thanks in advance :) Edit: added modulus. Still no luck.