moving sub-init2 to sub