refactored socketio into separate file