Rite Aid benefits from customer loyalty, investment