move initialize function from link to compile