Rite Aid to refinance $400 million worth of debt