added raw code for direct entitlement