refectoring init