move the slice init into generic init func