add init function.