fixed model parser to handle tokens