Underwriting in shares

When private company wants raise fund from public will go for the initial public offering. In IPO the company need get minimum subscription of shares from the public. If the IPO was not able raise minimum subscription then the ipo will fail. So to assure that the underwriter will guarantee the company to subscribe for the shares if the shares were not purchased by the public. Underwriter will come with agreement with the company that if ipo under subscribed then underwriter will purchase such shares. Underwriter will help the company to fix the price for the selling of share in the ipo. Even helps in meeting requirement for the ipo.