add initialization function