WORKING REVISION:

refractored server to work as chat server. updating server to work for algorithm