added basic init & exit functions