adding socket.io, helper methods