write a plugin init