add imageManager,and socket initialization