Add init function.