Barclays also booked a £ 326m profit on the sale of its closed life portfolio , and a £ 291m gain from the initial public offering of Visa , the credit card company , and the sale of shares in MasterCard .