init & exit functions implemented