some organization & adding socket.io