device init rework