function init completed