Update the init function.