modify the function init