some stuff
introduced init function and terminate funcion