edit initialize function