tokenize+parse altered
removed print statements etc