move nesting procssing after prepareTokens and avoid using equivalentTo