begin to use a collection, and globalise client side socket