Added an initialization function