before socket IO integration