second try for saving invoices