init full function code