Add initialization function.

Add an initialization function.