complete module initialize function