initialize method added - check it

add initialize method to make it more organized.