created invoices variable that is able to be passed as js object