Readjusted Intialize function and tested