move setup to kernel factory