rework sockets/session/arrays