separate form() method from showInvoices(), to reduce the file size, increasng load speed, and also making it easier to read