improved old code, but ...; added recursion to new parser