Ballistic pendulum

A ballistic pendulum is a device used to measure the speed of a bullet. A bullet of mass m is fired at a block of wood (mass M) hanging from a string. The bullet embeds itself in the block, and causes the combined block plus bullet system to swing up a height h. What is vo, the speed of the bullet before it hits the block?